import http from "@/common/api/request"
export const login = (phoneNum,passWord) => {
    return http.$axios(
        {
            url: '/api/login',
            method:'POST',
            data:{
                phoneNum,
                passWord
            }

        }
    )
    
}


// 接入短信验证码
// https://github.com/qcloudsms/qcloudsms_js
export const loginCode = (phoneNum) => {
    return http.$axios(
        {
            url: '/api/login/Code',
            method:'POST',
            data:{
                phoneNum
              
            }

        }
    )
}

// 新增用户
export const addUser = (phoneNum) => {
    return http.$axios(
        {
            url: '/api/login/addUser',
            method:'POST',
            data:{
                phoneNum,
               
            }

        }
    )
    
}
// 注册
export const register = (phoneNum,passWord) => {
    return http.$axios(
        {
            url: '/api/register',
            method:'POST',
            data:{
                phoneNum,
                passWord,
            }

        }
    )
    
}

// 找回密码
export const selectUser = (phoneNum) => {
    return http.$axios(
        {
            url: '/api/selectUser',
            method:'POST',
            data:{
                phoneNum,
                
            }

        }
    )
    
}

// 修改密码
export const modifyPassWord = (phoneNum,passWord) => {
    return http.$axios(
        {
            url: '/api/modifyPassWord',
            method:'POST',
            data:{
                phoneNum,
                passWord,
            }

        }
    )
    
}